/**
 * 
 */
package aiproject3.models;

import java.util.HashMap;

/**
 * Base class for a model
 * @param <U> Type of unit for the model's language
 * @param <E> Type of evaluator for each unit (may be a percent, 
 * or tally of each unit)
 * @author Chris Smith
 */
public abstract class Model<U, E> {

	protected HashMap<U,E> _data;
	
	protected Model(HashMap<U, E> data) {
		this._data = data;
	}
	
	protected Model() {
		this(new HashMap<U, E>());
	}
	
	public HashMap<U, E> getData() {
		return _data;
	}
	
	/**
	 * Adds a language unit to the model
	 * @param unit The language unit to add to the model
	 */
	public abstract void addToModel(U unit);
	
	/**
	 * Predicts the next unit based on the current model
	 * @return
	 */
	public abstract U predictNext();
	
}
